USE BIDDINGFEE
GO

/****** Object:  Table [dbo].[UserAdmin]    Script Date: 01/06/2013 21:45:17 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[UserAdmin](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[Username] [varchar](10) NOT NULL,
	[Deleted] [bit] NOT NULL,
	[Active] [bit] NOT NULL,
	[CreateDate] [datetime] NOT NULL,
	[CreateBy] [nvarchar](50) NOT NULL,
	[UpdateDate] [datetime] NOT NULL,
	[UpdateBy] [nvarchar](50) NOT NULL,
	[Password] [varchar](32) NULL,
	[HoTen] [nvarchar](200) NULL,
	[MANV] [varchar](10) NOT NULL,
 CONSTRAINT [PK_UserAdmin] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[UserAdmin]  WITH CHECK ADD  CONSTRAINT [FK_UserAdmin_NHANVIEN] FOREIGN KEY([Username])
REFERENCES [dbo].[NHANVIEN] ([MANV])
GO

ALTER TABLE [dbo].[UserAdmin] CHECK CONSTRAINT [FK_UserAdmin_NHANVIEN]
GO

